<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html"%>
    <script type="text/javascript" src="${ctx}/appjs/tenant/user/user.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/common.css?v=20200825">
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function(i,origText){
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>平台设置</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>平台账号设置</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';

    var TenantSetting_user_update = false;
    var TenantSetting_user_delete = false;
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <div class="pull-left search ">
                        <input id="loginName" name="loginName" type="text" class="form-control"
                               placeholder="登录账号">
<%--                        <select type="text" class="form-control" name="status" id="status">--%>
<%--                            <option value="">状态</option>--%>
<%--                            <option value="0">正常</option>--%>
<%--                            <option value="1">冻结</option>--%>
<%--                        </select>--%>
                    </div>
                    <div class="pull-left search">
                        <input id="mobile" name="mobile" type="text" class="form-control"
                               placeholder="联系方式">
<%--                        <select type="text" class="form-control" name="status" id="tenantRoleId">--%>
<%--                            <option value="">角色</option>--%>
<%--                            <c:choose>--%>
<%--                            <c:when test="${!empty tenantRoleList}">--%>
<%--                                <c:forEach items="${tenantRoleList}" var="tenantRole">--%>
<%--                                    <option value="${tenantRole.tenantRoleId}" >${tenantRole.roleName}--%>
<%--                                    </option>--%>
<%--                                </c:forEach>--%>
<%--                            </c:when>--%>
<%--                            </c:choose>--%>
<%--                        </select>--%>
                    </div>
<%--                    <div class="pull-left search col-md-2">--%>
<%--                        <input id="realName" name="realName" type="text" class="form-control"--%>
<%--                               placeholder="真实姓名">--%>
<%--                    </div>--%>
                    <div class="pull-left search">
                        <button class="btn btn-success" onclick="user.reLoad()">查询</button>
                    </div>
                    <div class="pull-left search " style="margin-left: 4px">
                        <button type="button" class="btn pull-right btn-primary" onclick="user.addTenantUser()">
                            增加
                        </button>
                    </div>
                    <div class="pull-left search" style="margin-left: 4px">
                        <button class="btn btn-success input-distance exportBtn" onclick="user.exportList()">导出</button>
                    </div>
                </div>


                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>

<shiro:hasPermission name="TenantSetting_user_update">
    <script>
        TenantSetting_user_update = true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="TenantSetting_user_delete">
    <script>
        TenantSetting_user_delete = true;
    </script>
</shiro:hasPermission>
<script type="text/javascript">
    user.init();
</script>

<!-- 定义是否主键的开关 -->
<script id="switchTpl" type="text/html">
    <!-- 这里的 checked 的状态是-->
    <input type="checkbox" name = "ifKey" value = {{d.colNo}} lay-skin="switch" lay-text="T|F" lay-filter="ifKeyDemo" {{ d.isSerial == 'T' ? 'checked' : '' }}>
</script>
</body>
</html>
